<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
    
  </style>
</head>
<body>
  
</body>
<script>

  function Model(){
    this.model1 = function(){
      return "hello"
    }
    this.model2 = function(){
      return "world"
    }
    this.model3 = function(){
      return "3.1415"
    }
  }

  function View(){
    this.view1 = function(data){
      // ...
      console.log(data)
    }
    this.view2 = function(data){
      // ...
      alert(data)
    }
    this.view3 = function(data){
      // ...
      document.write(data)
    }
  }

  function Ctrl(){
    const m = new Model();
    const v = new View();
    this.ctrl1 = function(){
      const data = m.model3();
      v.view1(data);
    }
    this.ctrl2 = function(){
      const data = m.model1();
      v.view2(data);
    }
    this.ctrl3 = function(){
      const data = m.model3();
      v.view2(data);
    }
    this.ctrl4 = function(){
      const data = m.model2();
      v.view3(data);
    }
  }

  const c = new Ctrl();

  c.ctrl1();
  c.ctrl2();
  c.ctrl3();
  c.ctrl4();
  
</script>
</html>